{% extends 'admin/base.html.twig' %}

{% block title %}Conference list{% endblock %}

{% block body %}
    <h2>comments: {{ conference }}</h2>
    {% if comments|length > 0 %}
        {% for comment in comments %}
            <h4>{{ comment }}({{ comment.author }})</h4>
            <span>{{ comment.text }}</span>
            <p>
                {{ comment.createdAt|date("Y-m-d H:i:s") }}
            </p>
            <a target="_blank" href="{{ url('review_comment', { id: comment.id }) }}">Accept</a>
            <a target="_blank" href="{{ url('review_comment', { id: comment.id, reject: true }) }}">Reject</a>
        {% endfor %}
        {% if previous >= 0 %}
            <a href="{{ path('admin_comment_list', { offset: previous }) }}">Previous</a>
        {% endif %}
        {% if next < comments|length %}
            <a href="{{ path('admin_comment_list', { offset: next }) }}">Next</a>
        {% endif %}
    {% else %}
        <div>No comments.</div>
    {% endif %}
{% endblock %}